package com.atguigu.gmall.realtime.web.service.impl;

import com.atguigu.gmall.realtime.web.bean.NameValueBean;
import com.atguigu.gmall.realtime.web.mapper.TrafficSourceKeywordPageViewWindowMapper;
import com.atguigu.gmall.realtime.web.service.TrafficService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TrafficServiceImpl  implements TrafficService {

    @Autowired
    TrafficSourceKeywordPageViewWindowMapper trafficSourceKeywordPageViewWindowMapper;

    @Override
    public List<NameValueBean> getKeywordStateList(String date) {
        Long dt = Long.valueOf(date.replace("-", ""));
        List<NameValueBean> nameValueBeanList = trafficSourceKeywordPageViewWindowMapper.getKeywordStat(dt);
        return nameValueBeanList;
    }
}
